#ifndef __WeatherSystem_h_
#define __WeatherSystem_h_


#include "BaseEngine.h"
#include "NxOgre.h"
#include "AppSettings.h"
#include "Map.h"

using namespace Ogre;

class WeatherSystem
{

public:
	enum eDayTime   {
		               DayTime_Dawn,
					   DayTime_Noon,
					   DayTime_AfterNoon,
					   DayTime_SunSet,
					   DayTime_Night
	                 };

public:
	WeatherSystem(SceneManager *mSceneMgr, Map *mMap);
	~WeatherSystem(void);

	Light *getSunLight(void);
	SceneNode *getSunObject(void);

	eDayTime getDayTime(void);

	void setDayTime(eDayTime dayTime);
	void advanceDayTime(void);

	void createRain(void);
	void stopRain(void);
	void toggleRain(void);
	bool isRaining(void);

	void createSnow(void);
	void stopSnow(void);
	void toggleSnow(void);
	bool isSnowing(void);

	void setSnowLevel(int snowLevel);
	void advanceSnowLevel(void);
	int getSnowLevel(void);

private:
	Vector3 mWorldPoz;
	Map *mMap;

	Light *mSun;
	SceneManager *mSceneMgr;
	SceneNode *mSunNode;
	eDayTime mDayTime;

	BillboardSet* bbs;
	Billboard* bb;

	SceneNode *mParticleSystemNode;
	ParticleSystem* psRain;
	ParticleSystem* psSnow;
	int nSnowLevel;

};

#endif // #ifndef __WeatherSystem_h_
